#ifndef  xResourceCreateParameter_h_h_h_h
#define xResourceCreateParameter_h_h_h_h

#include "XDefine.h"
#include "xVertexDeclaration.h"




namespace XE
{



	class   XClass xResourceCreateParameter
	{
	public:

		xResourceCreateParameter(const xString& name )
			:m_Name(name){}
		virtual ~xResourceCreateParameter(){}
	
		const xString& GetName() const {return m_Name;}
		xString m_Name;
	};



	class XClass xMeshCreateParameter :public xResourceCreateParameter
	{
	public:
		//xMeshCreateParameter(const xString& name, UINT faceNum,UINT vertexNum,\
		//	const xVertexDeclaration vertexDec,xMeshFlag flag = D3DXMESH_MANAGED);

		xMeshCreateParameter(const xString& name, UINT faceNum,UINT vertexNum,\
			xMeshFlag flag = D3DXMESH_MANAGED);



		virtual ~xMeshCreateParameter(){};

		const xVertexDeclaration& GetVertexDeclaration() const{return m_Dec;}

		UINT m_FaceNum;
		UINT m_VertexNum;
		xVertexDeclaration m_Dec;
		xMeshFlag m_Flag;



	};


	class XClass xTextureCreateParameter :public xResourceCreateParameter
	{
	public:
		xTextureCreateParameter(const xString& name,UINT width,UINT height,\
			xFormat form = D3DFMT_A8R8G8B8,UINT mipLev = 0,xPool  pool= D3DPOOL_MANAGED ,DWORD flag = 0,bool rendertarget=false)
		:xResourceCreateParameter(name),m_width(width),m_height(height),m_form(form),m_miplev(mipLev),m_pool(pool),m_flag(flag),
		m_RenderTarget(rendertarget)
		{

		}

		UINT m_width;
		UINT m_height;
		xFormat m_form;
		UINT m_miplev;
		xPool m_pool;
		DWORD m_flag;
		bool m_RenderTarget;

	};


	class XClass xShaderCreateParameter : public xResourceCreateParameter
	{
	public:

		xShaderCreateParameter(const xString& name,const xString& fileName, \
			const xString& CompliteFlag,\
			const xString& FunName="vsmain")
			:xResourceCreateParameter(name.c_str()),m_FileName(fileName),m_ComFlag(CompliteFlag),m_FunName(FunName)
		{
			m_Name = name.c_str();

		}

		xString m_FileName;
		xString m_ComFlag;
		xString m_FunName;


	};




}













#endif